home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
program
/
gemxx19.zoo
/
gem++19
/
man
/
gemf.man
< prev
next >
Wrap
Text File
|
1993-08-24
|
6KB
|
154 lines
GEM++ - C++ LIBRARIES FOR GEM/AES/VDI
NAME
GEMform - interacts with the user through a GEM form (dialog box).
DESCRIPTION
Forms or "dialog boxes" are objects which may interact with the
user. The activities of the user may trigger events to be sent
to components of the GEMform. GEMrawobjects are the components
of GEMforms, however, it is GEMobjects declared to be part of
a GEMform that are most interesting, and can be found by using
the Cook() method of a GEMrawobject for which a GEMobject has
been declared.
CONSTRUCTORS
GEMform(const GEMrsc& rsc, int RSCindex)
Create a form that is the form specified by the given index
in the given GEMrsc.
GEMform(const GEMform&)
Create a copy of the given GEMform. All parts of the form
are duplicated, except those that are sharable:
The first (least significant) bits of the ExtendedType
define whether an object needs to have a new copy of
the object-specific data, or whether it is sharable.
For EDITABLE objects, ExtendedType 0 indicates that the
user-input text of the object is not sharable - a duplicate
copy of the text is made. ExtendedType 1 indicates that
the template and prompt text needs to be copied.
ExtendedType 2 indicates that all may be shared.
ExtendedType 3 indicates that user-input text can be
shared, but the prompt and template are to be copied.
For non-EDITABLE objects, 0 indicates all shared,
1 indicates text shared, 2 indicates non-text shared,
and 3 indicates non shared.
For icons, the "user-input" text is the label and
the "prompt" is the icon.
This may seem fairly complicated at first, but basically
you can leave the ExtendedType set to 0 for most
applications.
METHODS
virtual int Do(int x, int y);
Conduct the interaction by drawing the form at the given
screen position until a component GEMobject signals for the
interaction to end (see GEMfeedback) or a part of the form
that is not declared as a GEMobject and that has the TOUCHEXIT
or EXIT flags set is clicked. The RSC index of the object
that caused the exit is returned.
int Do()
As above, but centred.
bool Zooms(bool b)
Disable or enable the "zoom" lines. (default = disabled)
bool Flight(bool b)
Enable/disable flying ability of this dialog. Returns previous
state. By default, TRUE. Need only be disabled if memory is
at a premium when the dialog is being displayed.
void Fly(bool opaque=TRUE)
If flight is enabled, this method causes flight to occur.
For example, the action of DoItem() when any non-interesting
item is chosen may be to call this method. Does nothing is
Flight is disabled. Note that if memory could not be allocated
during form display, this will do nothing.
virtual void RedrawObject(int RSCindex)
Redraw the given object in the form.
virtual void RedrawObject(int RSCindex,int Cx,int Cy,int Cw,int Ch)
Redraw the given object in the form, clipped as specified.
int Parent(int RSCindex) const
Return the RSCindex of the parent of the object with the
given RSCindex.
GEMrawobject* operator[](int RSCindex) const;
Return the component with the given RSCindex. Often the
Cook() method of this GEMrawobject will be called.
void AlignObject(int RSCindex, int xmult=8, int ymult=1)
Some objects, especially text, redraw faster when then are byte-
or word-aligned on the screen. This method sets the alignment
for the window such that the given object is positioned at a
multiple of the given coordinates.
int Map(int Do(GEMrawobject* tree, int obj),
bool skiphidden=TRUE, int RSCfrom=0, int RSCto=-1)
Call the given function for each object in this form such that
tree[obj] is the object, starting from RSCfrom, ending at RSCto
or end-of-tree. If objects with HideTree() TRUE are to be
trasparently skipped, set skiphidden to TRUE (default). The
function should return -1 if the search should continue into
the subtrees of the object, -2 if the search should skip the
subtrees (continuing to siblings), or a non-negative value,
which immediately terminates the search. Map() returns the
value of the last call to the parametric Do() function.
int Index() const
Returns the RSCindex from which the form was created.
EXTENSION METHODS
GEMrawobject *Obj
The actual GEM tree.
virtual int FormDo()
Perform the functions of the standard GEM form_do() function
See GEMhotform for an example use of this.
virtual GEMfeedback DoItem(int item, const GEMevent& e)
Called by Do() when objects are touched. Standard function calls
the Touch() member of the GEMobject (if the GEMrawobject can
be Cook()ed). Overriding this method provides a simple form-level
click handler. Normally, any override of this method would
pass on control to the standard GEMform::DoItem(...) so that
any GEMobjects declared in the form are triggered.
EXAMPLES
{
GEMapplication appl;
GEMrsc rsc("foo.rsc");
GEMform form(rsc,FORM_RSC_INDEX);
form.Do();
}
SEE ALSO
GEMobject, GEMrawobject, GEMhotform
BUGS
Bugs in GEM++ should be reported to warwick@cs.uq.oz.au
AUTHOR
Warwick Allison, 1993.
warwick@cs.uq.oz.au
COPYING
This functionality is part of the GEM++ library,
and is Copyright 1993 by Warwick W. Allison.
GEM++ is free and protected under the GNU Library General Public
License.
You are free to copy and modify these sources, provided you
acknowledge the origin by retaining this notice, and adhere to
the conditions described in the GNU LGPL.